<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>${site.name }</title>
		<meta name="description" content="${site.description }" />
		<meta name="keywords" content="${site.keywords}" />
		<jsp:include page="../../../inc/js.jsp"></jsp:include>
		<jsp:include page="../../../inc/css.jsp"></jsp:include>
		<script type="text/javascript">
function movePage(pageNo) {
	window.location = '?pageNo=' + pageNo + param();
}
function param() {
	var param = "";
	if ($("#workYear").val() != "")
		param += '&workYear=' + $("#workYear").val();
	if ($("#realName").val() != "")
		param += '&realName=' + $("#realName").val();
	if ($("#sex").val() != "")
		param += '&sex=' + $("#sex").val();
	if ($("#degree").val() != "")
		param += '&degree=' + $("#degree").val();
	if ($("#major").val() != "")
		param += '&major=' + $("#major").val();
	return param;
}
$(document).ready(
		function() {
			$.get("getSelect.do", {
				type : '2',
				index : '${param.sex}'
			}, function(data) {
				$("select#sex").append(data);
			});
			$.get("getSelect.do", {
				type : '3',
				index : '${param.degree}'
			}, function(data) {
				$("select#degree").append(data);
			});
			$.get("getSelect.do", {
				type : '7',
				code : null,
				index : '${param.major}'
			}, function(data) {
				$("select#major").append(data);
			});
			$("#search").button().click(function() {
				movePage(1);
			});
			$.get("topUserList.do?type=fix&top=10&short&" + Math.random(),
					function(data) {
						$("#topRCFix").append(data);
					});
			$.get("topUserList.do?type=view&top=10&short&" + Math.random(),
					function(data) {
						$("#topRCView").append(data);
					});
		});
function del(id){
		if(confirm('确认删除？')){
			$.ajax( {
				type : "get",
				url : "deleteUser.do",
				data : {
					id : id
				},
				dataType:'json',
				error : function() {
					alert("加载错误");
				},
				success : function(data) {
					if(data.success){
						alert('操作成功！');
						location='?classid=${param.classid}&&pageTitle=${param.pageTitle}';
					}else alert('操作失败！\r\n'+data.err);
				}
			});
		}
	}
</script>
	</head>
	<body>
		<jsp:include page="../../../head.jsp"></jsp:include>
		<div class="container">
			<div class="header"></div>
			<div class="mainContent">
				<div class="content">
				<jsp:include page="../../../inc/menuPath.jsp">
	<jsp:param value="${url}" name="url"/>
</jsp:include>
					<table class="list" cellpadding="0" width="500" cellspacing="1">
						<thead>
							<tr>
								<td colspan="6" class="search">
									<label>
										姓名：
									</label>
									<input id="realName" value="${param.realName }" class="name">
									<label>
										工龄：
									</label>
									<input id="workYear" name="workYear" style="width: 30px;"
										value="${param.workYear }" />
									<select id="sex" name="sex">
										<option value="">
											请选择性别
										</option>
									</select>
									<select id="degree" name="degree">
										<option value="">
											请选择学历
										</option>
									</select>
									<select id="major" name="major">
										<option value="">
											请选择专业
										</option>
									</select>
									<button id="search">
										查询
									</button>
								</td>
							</tr>
							<tr>
								<td>
									姓名
								</td>
								<td>
									年龄
								</td>
								<td>
									性别
								</td>
								<td>
									学历
								</td>
								<td>
									专业
								</td>
								<td>
									工作年限
								</td>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="e" items="${o.dataList}" varStatus="s">
								<tr>
									<td>
										<a href="showUser.do?id=${e.id }" target="_blank">${e.realName}</a>
										<c:if test="${e.fix>0}">
											<font color="red">[推荐]</font>
										</c:if>
										<!--<c:if test="${admin!=null}"><a href="javascript:del(${e.id});"><img src="lib/images/close.gif"/></a></c:if>-->
									</td>
									<td align="center">
										${e.age }
									</td>
									<td align="center">
										${e.sex }
									</td>
									<td align="center">
										${e.degree }
									</td>
									<td >
										${e.major }
									</td>
									<td align="center">
										${e.workYear }
									</td>
								</tr>
							</c:forEach>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="6">
									${o.pageNav }
								</td>
							</tr>
						</tfoot>
					</table>
				</div>
				<div class="sidebar">
					<div class="box">
						<h1 class="line">
							推荐人才
						</h1>
						<div id="topRCFix"></div>
					</div>
					<div class="box">
						<h1 class="line">
							热点人才
						</h1>
						<div id="topRCView"></div>
					</div>
					<jsp:include page="../../../advRight.jsp"></jsp:include></div>
			</div>
		</div><jsp:include page="../../../foot.jsp"></jsp:include>
	</body>
</html>